package miao.demo;

import miao.demo.dao.BookDao;
import miao.demo.service.impl.BookServiceImpl;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/*
    目标：掌握spring的注解开发 
 */
public class App {
    public static void main(String[] args) {
        AbstractApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
        BookDao bookDao = ctx.getBean("bookDao", BookDao.class);
        System.out.println(bookDao);
        BookServiceImpl bookService = ctx.getBean(BookServiceImpl.class);
        System.out.println(bookService);
    }
}
